package org.csu.question.entity.dto;

import lombok.Data;

@Data
public class DifficultyStatsDTO {
    private String difficulty;
    private String difficultyName;
    private Integer totalCount;
    private Integer correctCount;
    private Double correctRate;

    public String getDifficultyName() {
        return switch (difficulty) {
            case "EASY" -> "简单";
            case "MEDIUM" -> "中等";
            case "HARD" -> "困难";
            default -> difficulty;
        };
    }
}
